From 7b2113fd32680e3df6c8a32f33fad9f6bdabb8fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Wed, 13 Apr 2011 12:25:06 +0100 Subject: [PATCH] Move documentation to inline comments: GtkCheckButton --- docs/reference/gtk/tmpl/.gitignore | 1 + docs/reference/gtk/tmpl/gtkcheckbutton.sgml | 85 --------------------- gtk/gtkcheckbutton.c | 32 +++++++- 3 files changed, 32 insertions(+), 86 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkcheckbutton.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index 4da0086f81..3679f03047 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -19,6 +19,7 @@ gtkcellrendererspin.sgml gtkcellrenderertext.sgml gtkcellrenderertoggle.sgml gtkcellview.sgml +gtkcheckbutton.sgml gtkcolorbutton.sgml gtkcolorsel.sgml gtkcombobox.sgml diff --git a/docs/reference/gtk/tmpl/gtkcheckbutton.sgml b/docs/reference/gtk/tmpl/gtkcheckbutton.sgml deleted file mode 100644 index 0e6313debd..0000000000 --- a/docs/reference/gtk/tmpl/gtkcheckbutton.sgml +++ /dev/null @@ -1,85 +0,0 @@ - -GtkCheckButton - - -Create widgets with a discrete toggle button - - - -A #GtkCheckButton places a discrete #GtkToggleButton next to a widget, (usually a #GtkLabel). See the section on #GtkToggleButton widgets for more information about toggle/check buttons. - - -The important signal ('toggled') is also inherited from #GtkToggleButton. - - - - - - -#GtkCheckMenuItem -add check buttons to your menus. - - -#GtkButton -a more general button. - - -#GtkToggleButton -#GtkCheckButton's parent. - - -#GtkRadioButton -group check buttons together. - - - - - - - - - - - - -toggle_button is a #GtkToggleButton representing the actual toggle button that composes the check button. - - - - - - - - - - - - - - - -Creates a new #GtkCheckButton. - - -@void: -@Returns: a #GtkWidget. - - - - -Creates a new #GtkCheckButton with a #GtkLabel to the right of it. - - -@label: the text for the check button. -@Returns: a #GtkWidget. - - - - - - - -@label: -@Returns: - - diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c index 5b9d35d3c5..9ceb6b1b28 100644 --- a/gtk/gtkcheckbutton.c +++ b/gtk/gtkcheckbutton.c @@ -35,6 +35,21 @@ #include "gtkintl.h" +/** + * SECTION:gtkcheckbutton + * @Short_description: Create widgets with a discrete toggle button + * @Title: GtkCheckButton + * @See_also: #GtkCheckMenuItem, #GtkButton, #GtkToggleButton, #GtkRadioButton + * + * A #GtkCheckButton places a discrete #GtkToggleButton next to a widget, + * (usually a #GtkLabel). See the section on #GtkToggleButton widgets for + * more information about toggle/check buttons. + * + * The important signal ( #GtkToggleButton::toggled ) is also inherited from + * #GtkToggleButton. + */ + + #define INDICATOR_SIZE 16 #define INDICATOR_SPACING 2 @@ -99,6 +114,13 @@ gtk_check_button_init (GtkCheckButton *check_button) gtk_button_set_alignment (GTK_BUTTON (check_button), 0.0, 0.5); } +/** + * gtk_check_button_new: + * + * Creates a new #GtkCheckButton. + * + * Returns: a #GtkWidget. + */ GtkWidget* gtk_check_button_new (void) { @@ -106,6 +128,14 @@ gtk_check_button_new (void) } +/** + * gtk_check_button_new_with_label: + * @label: the text for the check button. + * + * Creates a new #GtkCheckButton with a #GtkLabel to the right of it. + * + * Returns: a #GtkWidget. + */ GtkWidget* gtk_check_button_new_with_label (const gchar *label) { @@ -115,7 +145,7 @@ gtk_check_button_new_with_label (const gchar *label) /** * gtk_check_button_new_with_mnemonic: * @label: The text of the button, with an underscore in front of the - * mnemonic character + * mnemonic character * @returns: a new #GtkCheckButton * * Creates a new #GtkCheckButton containing a label. The label -- 2.30.2